package com.slz3.business.module.configManagement.conSiteProvince.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conSiteProvince.domain.ConSiteProvince;
import com.slz3.business.module.configManagement.conSiteProvince.domain.ConSiteProvinceCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConSiteProvinceResController {

    static Mono<ServerResponse> add(ServerRequest req, ConSiteProvince conSiteProvince) {
        if (ConSiteProvinceResUnsafeValid.add(req, conSiteProvince)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteProvinceResAtomic.add_$ConSiteProvinceUpdateLock(req, conSiteProvince);
        }
    }

    static final Mono<ServerResponse> delete(ServerRequest req, ConSiteProvinceCondition conSiteProvinceCondition) {
        if (ConSiteProvinceResUnsafeValid.delete(req, conSiteProvinceCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteProvinceResAtomic.delete_$ConSiteProvinceUpdateLock(req, conSiteProvinceCondition);
        }
    }

    static Mono<ServerResponse> modify(ServerRequest req, ConSiteProvince conSiteProvince) {
        if (ConSiteProvinceResUnsafeValid.modify(req, conSiteProvince)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteProvinceResAtomic.modify_$ConSiteProvinceUpdateLock(req, conSiteProvince);
        }
    }

    static Mono<ServerResponse> list(ServerRequest req) {
        if (ConSiteProvinceResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteProvinceResExecutor.list(req);
        }
    }

    static Mono<ServerResponse> info(ServerRequest req) {
        if (ConSiteProvinceResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteProvinceResAtomic.info_$ConSiteProvinceUpdateLock(req);
        }
    }

    static Mono<ServerResponse> choice(ServerRequest req) {
        if (ConSiteProvinceResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteProvinceResExecutor.choice(req);
        }
    }

    static final Mono<ServerResponse> auditSubmit(ServerRequest req, ConSiteProvinceCondition conSiteProvinceCondition) {
        //
        if (ConSiteProvinceResUnsafeValid.auditSubmit(req, conSiteProvinceCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteProvinceResAtomic.auditSubmit_$ConSiteProvinceUpdateLock(req, conSiteProvinceCondition);
        }
    }

    static final Mono<ServerResponse> audit(ServerRequest req, ConSiteProvinceCondition conSiteProvinceCondition) {
        if (ConSiteProvinceResUnsafeValid.audit(req, conSiteProvinceCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteProvinceResAtomic.audit_$ConSiteProvinceUpdateLock(req, conSiteProvinceCondition);
        }
    }

    static final Mono<ServerResponse> auditReject(ServerRequest req, ConSiteProvinceCondition conSiteProvinceCondition) {
        if (ConSiteProvinceResUnsafeValid.auditReject(req, conSiteProvinceCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteProvinceResAtomic.auditReject_$ConSiteProvinceUpdateLock(req, conSiteProvinceCondition);
        }
    }

    static final Mono<ServerResponse> usingEnable(ServerRequest req, ConSiteProvinceCondition conSiteProvinceCondition) {
        if (ConSiteProvinceResUnsafeValid.usingEnable(req, conSiteProvinceCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteProvinceResAtomic.usingEnable_$ConSiteProvinceUpdateLock(req, conSiteProvinceCondition);
        }
    }

    static final Mono<ServerResponse> usingDisable(ServerRequest req, ConSiteProvinceCondition conSiteProvinceCondition) {
        if (ConSiteProvinceResUnsafeValid.usingDisable(req, conSiteProvinceCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConSiteProvinceResAtomic.usingDisable_$ConSiteProvinceUpdateLock(req, conSiteProvinceCondition);
        }
    }

}
